.class public Lcom/arellomobile/android/push/DeviceFeature2_5;
.super Ljava/lang/Object;
.source "DeviceFeature2_5.java"


# static fields
.field private static final APP_OPEN:Ljava/lang/String; = "applicationOpen"

.field private static final GOAL_ACHIEVED:Ljava/lang/String; = "applicationEvent"

.field private static final MSG_DELIVERED:Ljava/lang/String; = "messageDeliveryEvent"

.field private static final NEAREST_ZONE:Ljava/lang/String; = "getNearestZone"

.field private static final PACKAGE_REMOVED:Ljava/lang/String; = "androidPackageRemoved"

.field private static final PUSH_STAT:Ljava/lang/String; = "pushStat"

.field private static final TAG:Ljava/lang/String; = "PushWoosh DeviceFeature2_5"

.field private static final TAGS_PATH:Ljava/lang/String; = "setTags"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 29
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static getNearestZone(Landroid/content/Context;Landroid/location/Location;)Lcom/arellomobile/android/push/data/PushZoneLocation;
    .locals 9
    .parameter "context"
    .parameter "location"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .prologue
    const/16 v8, 0xc8

    .line 220
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 222
    .local v0, data:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v5, "1.3"

    invoke-static {p0, p1, v5}, Lcom/arellomobile/android/push/request/RequestHelper;->getNearestZoneData(Landroid/content/Context;Landroid/location/Location;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->putAll(Ljava/util/Map;)V

    .line 224
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Try To Sent Nearest Zone"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 226
    new-instance v4, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    const/16 v5, 0x1f4

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-direct {v4, v5, v6, v7}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;-><init>(IILorg/json/JSONObject;)V

    .line 227
    .local v4, res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    new-instance v2, Ljava/lang/Exception;

    invoke-direct {v2}, Ljava/lang/Exception;-><init>()V

    .line 228
    .local v2, exception:Ljava/lang/Exception;
    const/4 v3, 0x0

    .local v3, i:I
    :goto_0
    const/4 v5, 0x5

    if-lt v3, v5, :cond_1

    .line 249
    :cond_0
    const-string v5, "PushWoosh DeviceFeature2_5"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "ERROR: sent Nearest Zone "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ". Response = "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 250
    throw v2

    .line 232
    :cond_1
    :try_start_0
    const-string v5, "getNearestZone"

    invoke-static {v0, v5}, Lcom/arellomobile/android/push/utils/NetworkUtils;->makeRequest(Ljava/util/Map;Ljava/lang/String;)Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    move-result-object v4

    .line 233
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultCode()I

    move-result v5

    if-eq v8, v5, :cond_2

    .line 228
    :goto_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 236
    :cond_2
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getPushwooshCode()I

    move-result v5

    if-ne v8, v5, :cond_0

    .line 239
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Send Nearest Zone success"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 241
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultData()Lorg/json/JSONObject;

    move-result-object v5

    const-string v6, "1.3"

    invoke-static {v5, v6}, Lcom/arellomobile/android/push/request/RequestHelper;->getPushZoneLocationFromData(Lorg/json/JSONObject;Ljava/lang/String;)Lcom/arellomobile/android/push/data/PushZoneLocation;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v5

    return-object v5

    .line 243
    :catch_0
    move-exception v1

    .line 245
    .local v1, e:Ljava/lang/Exception;
    move-object v2, v1

    goto :goto_1
.end method

.method public static sendAppOpen(Landroid/content/Context;)V
    .locals 9
    .parameter "context"

    .prologue
    const/16 v8, 0xc8

    .line 111
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 113
    .local v0, data:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v5, "1.3"

    invoke-static {p0, v5}, Lcom/arellomobile/android/push/request/RequestHelper;->getSendAppOpenData(Landroid/content/Context;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->putAll(Ljava/util/Map;)V

    .line 115
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Try To sent AppOpen"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 117
    new-instance v4, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    const/16 v5, 0x1f4

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-direct {v4, v5, v6, v7}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;-><init>(IILorg/json/JSONObject;)V

    .line 118
    .local v4, res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    new-instance v2, Ljava/lang/Exception;

    invoke-direct {v2}, Ljava/lang/Exception;-><init>()V

    .line 119
    .local v2, exception:Ljava/lang/Exception;
    const/4 v3, 0x0

    .local v3, i:I
    :goto_0
    const/4 v5, 0x5

    if-lt v3, v5, :cond_1

    .line 139
    :cond_0
    const-string v5, "PushWoosh DeviceFeature2_5"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "ERROR: Try To sent AppOpen "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ". Response = "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultData()Lorg/json/JSONObject;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 141
    :goto_1
    return-void

    .line 123
    :cond_1
    :try_start_0
    const-string v5, "applicationOpen"

    invoke-static {v0, v5}, Lcom/arellomobile/android/push/utils/NetworkUtils;->makeRequest(Ljava/util/Map;Ljava/lang/String;)Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    move-result-object v4

    .line 124
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultCode()I

    move-result v5

    if-eq v8, v5, :cond_2

    .line 119
    :goto_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 127
    :cond_2
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getPushwooshCode()I

    move-result v5

    if-ne v8, v5, :cond_0

    .line 130
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Send AppOpen success"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    .line 133
    :catch_0
    move-exception v1

    .line 135
    .local v1, e:Ljava/lang/Exception;
    move-object v2, v1

    goto :goto_2
.end method

.method static sendAppRemovedData(Landroid/content/Context;Ljava/lang/String;)V
    .locals 9
    .parameter "context"
    .parameter "packageName"

    .prologue
    const/16 v8, 0xc8

    .line 292
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 294
    .local v0, data:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v5, "1.3"

    invoke-static {p0, p1, v5}, Lcom/arellomobile/android/push/request/RequestHelper;->getAppRemovedData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->putAll(Ljava/util/Map;)V

    .line 296
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Try To sent AppRemoved"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 298
    new-instance v4, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    const/16 v5, 0x1f4

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-direct {v4, v5, v6, v7}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;-><init>(IILorg/json/JSONObject;)V

    .line 299
    .local v4, res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    new-instance v2, Ljava/lang/Exception;

    invoke-direct {v2}, Ljava/lang/Exception;-><init>()V

    .line 300
    .local v2, exception:Ljava/lang/Exception;
    const/4 v3, 0x0

    .local v3, i:I
    :goto_0
    const/4 v5, 0x5

    if-lt v3, v5, :cond_1

    .line 320
    :cond_0
    const-string v5, "PushWoosh DeviceFeature2_5"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "ERROR: Try To sent AppRemoved "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ". Response = "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultData()Lorg/json/JSONObject;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 322
    :goto_1
    return-void

    .line 304
    :cond_1
    :try_start_0
    const-string v5, "androidPackageRemoved"

    invoke-static {v0, v5}, Lcom/arellomobile/android/push/utils/NetworkUtils;->makeRequest(Ljava/util/Map;Ljava/lang/String;)Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    move-result-object v4

    .line 305
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultCode()I

    move-result v5

    if-eq v8, v5, :cond_2

    .line 300
    :goto_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 308
    :cond_2
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getPushwooshCode()I

    move-result v5

    if-ne v8, v5, :cond_0

    .line 311
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Send AppRemoved success"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    .line 314
    :catch_0
    move-exception v1

    .line 316
    .local v1, e:Ljava/lang/Exception;
    move-object v2, v1

    goto :goto_2
.end method

.method public static sendGoalAchieved(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Integer;)V
    .locals 9
    .parameter "context"
    .parameter "goal"
    .parameter "count"

    .prologue
    const/16 v8, 0xc8

    .line 77
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 79
    .local v0, data:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v5, "1.3"

    invoke-static {p0, p1, p2, v5}, Lcom/arellomobile/android/push/request/RequestHelper;->getSendGoalAchievedData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->putAll(Ljava/util/Map;)V

    .line 81
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Try To sent Goal"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 83
    new-instance v4, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    const/16 v5, 0x1f4

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-direct {v4, v5, v6, v7}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;-><init>(IILorg/json/JSONObject;)V

    .line 84
    .local v4, res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    new-instance v2, Ljava/lang/Exception;

    invoke-direct {v2}, Ljava/lang/Exception;-><init>()V

    .line 85
    .local v2, exception:Ljava/lang/Exception;
    const/4 v3, 0x0

    .local v3, i:I
    :goto_0
    const/4 v5, 0x5

    if-lt v3, v5, :cond_1

    .line 105
    :cond_0
    const-string v5, "PushWoosh DeviceFeature2_5"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "ERROR: Try To sent PushStat "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ". Response = "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultData()Lorg/json/JSONObject;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 107
    :goto_1
    return-void

    .line 89
    :cond_1
    :try_start_0
    const-string v5, "applicationEvent"

    invoke-static {v0, v5}, Lcom/arellomobile/android/push/utils/NetworkUtils;->makeRequest(Ljava/util/Map;Ljava/lang/String;)Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    move-result-object v4

    .line 90
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultCode()I

    move-result v5

    if-eq v8, v5, :cond_2

    .line 85
    :goto_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 93
    :cond_2
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getPushwooshCode()I

    move-result v5

    if-ne v8, v5, :cond_0

    .line 96
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Send Goal success"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    .line 99
    :catch_0
    move-exception v1

    .line 101
    .local v1, e:Ljava/lang/Exception;
    move-object v2, v1

    goto :goto_2
.end method

.method public static sendMessageDeliveryEvent(Landroid/content/Context;Ljava/lang/String;)V
    .locals 9
    .parameter "context"
    .parameter "hash"

    .prologue
    const/16 v8, 0xc8

    .line 255
    if-nez p1, :cond_0

    .line 288
    :goto_0
    return-void

    .line 258
    :cond_0
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 260
    .local v0, data:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v5, "1.3"

    invoke-static {p0, p1, v5}, Lcom/arellomobile/android/push/request/RequestHelper;->getSendPushStatData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->putAll(Ljava/util/Map;)V

    .line 262
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Try To sent MsgDelivered"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 264
    new-instance v4, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    const/16 v5, 0x1f4

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-direct {v4, v5, v6, v7}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;-><init>(IILorg/json/JSONObject;)V

    .line 265
    .local v4, res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    new-instance v2, Ljava/lang/Exception;

    invoke-direct {v2}, Ljava/lang/Exception;-><init>()V

    .line 266
    .local v2, exception:Ljava/lang/Exception;
    const/4 v3, 0x0

    .local v3, i:I
    :goto_1
    const/4 v5, 0x5

    if-lt v3, v5, :cond_2

    .line 286
    :cond_1
    const-string v5, "PushWoosh DeviceFeature2_5"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "ERROR: Try To sent MsgDelivered "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ". Response = "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultData()Lorg/json/JSONObject;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0

    .line 270
    :cond_2
    :try_start_0
    const-string v5, "messageDeliveryEvent"

    invoke-static {v0, v5}, Lcom/arellomobile/android/push/utils/NetworkUtils;->makeRequest(Ljava/util/Map;Ljava/lang/String;)Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    move-result-object v4

    .line 271
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultCode()I

    move-result v5

    if-eq v8, v5, :cond_3

    .line 266
    :goto_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_1

    .line 274
    :cond_3
    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getPushwooshCode()I

    move-result v5

    if-ne v8, v5, :cond_1

    .line 277
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Send MsgDelivered success"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 280
    :catch_0
    move-exception v1

    .line 282
    .local v1, e:Ljava/lang/Exception;
    move-object v2, v1

    goto :goto_2
.end method

.method public static sendPushStat(Landroid/content/Context;Ljava/lang/String;)V
    .locals 8
    .parameter "context"
    .parameter "hash"

    .prologue
    .line 43
    if-nez p1, :cond_0

    .line 73
    :goto_0
    return-void

    .line 46
    :cond_0
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 48
    .local v0, data:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v5, "1.3"

    invoke-static {p0, p1, v5}, Lcom/arellomobile/android/push/request/RequestHelper;->getSendPushStatData(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->putAll(Ljava/util/Map;)V

    .line 50
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Try To sent PushStat"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 52
    new-instance v4, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    const/16 v5, 0x1f4

    const/4 v6, 0x0

    const/4 v7, 0x0

    invoke-direct {v4, v5, v6, v7}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;-><init>(IILorg/json/JSONObject;)V

    .line 53
    .local v4, res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    new-instance v2, Ljava/lang/Exception;

    invoke-direct {v2}, Ljava/lang/Exception;-><init>()V

    .line 54
    .local v2, exception:Ljava/lang/Exception;
    const/4 v3, 0x0

    .local v3, i:I
    :goto_1
    const/4 v5, 0x5

    if-lt v3, v5, :cond_1

    .line 71
    const-string v5, "PushWoosh DeviceFeature2_5"

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "ERROR: Try To sent PushStat "

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    const-string v7, ". Response = "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultData()Lorg/json/JSONObject;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0

    .line 58
    :cond_1
    :try_start_0
    const-string v5, "pushStat"

    invoke-static {v0, v5}, Lcom/arellomobile/android/push/utils/NetworkUtils;->makeRequest(Ljava/util/Map;Ljava/lang/String;)Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    move-result-object v4

    .line 59
    const/16 v5, 0xc8

    invoke-virtual {v4}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultCode()I

    move-result v6

    if-ne v5, v6, :cond_2

    .line 61
    const-string v5, "PushWoosh DeviceFeature2_5"

    const-string v6, "Send PushStat success"

    invoke-static {v5, v6}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 65
    :catch_0
    move-exception v1

    .line 67
    .local v1, e:Ljava/lang/Exception;
    move-object v2, v1

    .line 54
    .end local v1           #e:Ljava/lang/Exception;
    :cond_2
    add-int/lit8 v3, v3, 0x1

    goto :goto_1
.end method

.method public static sendTags(Landroid/content/Context;Ljava/util/Map;)Lorg/json/JSONArray;
    .locals 14
    .parameter "context"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;)",
            "Lorg/json/JSONArray;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/Exception;
        }
    .end annotation

    .prologue
    .line 145
    .local p1, tags:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    .line 147
    .local v0, data:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    const-string v11, "1.3"

    invoke-static {p0, v11}, Lcom/arellomobile/android/push/request/RequestHelper;->getSendTagsData(Landroid/content/Context;Ljava/lang/String;)Ljava/util/Map;

    move-result-object v11

    invoke-interface {v0, v11}, Ljava/util/Map;->putAll(Ljava/util/Map;)V

    .line 149
    new-instance v8, Lorg/json/JSONObject;

    invoke-direct {v8}, Lorg/json/JSONObject;-><init>()V

    .line 150
    .local v8, tagsObject:Lorg/json/JSONObject;
    invoke-interface {p1}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v11

    invoke-interface {v11}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v11

    :goto_0
    invoke-interface {v11}, Ljava/util/Iterator;->hasNext()Z

    move-result v12

    if-nez v12, :cond_1

    .line 184
    const-string v11, "tags"

    invoke-interface {v0, v11, v8}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 186
    const-string v11, "PushWoosh DeviceFeature2_5"

    const-string v12, "Try To sent Tags"

    invoke-static {v11, v12}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 188
    new-instance v6, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    const/16 v11, 0x1f4

    const/4 v12, 0x0

    const/4 v13, 0x0

    invoke-direct {v6, v11, v12, v13}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;-><init>(IILorg/json/JSONObject;)V

    .line 189
    .local v6, res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    new-instance v2, Ljava/lang/Exception;

    invoke-direct {v2}, Ljava/lang/Exception;-><init>()V

    .line 190
    .local v2, exception:Ljava/lang/Exception;
    const/4 v3, 0x0

    .local v3, i:I
    :goto_1
    const/4 v11, 0x5

    if-lt v3, v11, :cond_9

    .line 214
    :cond_0
    const-string v11, "PushWoosh DeviceFeature2_5"

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "ERROR: sent Tags "

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    const-string v13, ". Response = "

    invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-static {v11, v12, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 215
    throw v2

    .line 150
    .end local v2           #exception:Ljava/lang/Exception;
    .end local v3           #i:I
    .end local v6           #res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    :cond_1
    invoke-interface {v11}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    .line 152
    .local v5, key:Ljava/lang/String;
    invoke-interface {p1, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v9

    .line 153
    .local v9, value:Ljava/lang/Object;
    instance-of v12, v9, Ljava/lang/String;

    if-nez v12, :cond_2

    instance-of v12, v9, Ljava/lang/Integer;

    if-eqz v12, :cond_3

    .line 155
    :cond_2
    invoke-virtual {v8, v5, v9}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_0

    .line 157
    :cond_3
    instance-of v12, v9, Ljava/util/List;

    if-eqz v12, :cond_7

    .line 159
    new-instance v10, Lorg/json/JSONArray;

    invoke-direct {v10}, Lorg/json/JSONArray;-><init>()V

    .line 160
    .local v10, values:Lorg/json/JSONArray;
    check-cast v9, Ljava/util/List;

    .end local v9           #value:Ljava/lang/Object;
    invoke-interface {v9}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v12

    :goto_2
    invoke-interface {v12}, Ljava/util/Iterator;->hasNext()Z

    move-result v13

    if-nez v13, :cond_4

    .line 171
    invoke-virtual {v8, v5, v10}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_0

    .line 160
    :cond_4
    invoke-interface {v12}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v4

    .line 162
    .local v4, item:Ljava/lang/Object;
    instance-of v13, v4, Ljava/lang/String;

    if-nez v13, :cond_5

    instance-of v13, v4, Ljava/lang/Integer;

    if-eqz v13, :cond_6

    .line 164
    :cond_5
    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v13

    invoke-virtual {v10, v13}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    goto :goto_2

    .line 168
    :cond_6
    new-instance v11, Ljava/lang/RuntimeException;

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "wrong type for tag: "

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-direct {v11, v12}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v11

    .line 173
    .end local v4           #item:Ljava/lang/Object;
    .end local v10           #values:Lorg/json/JSONArray;
    .restart local v9       #value:Ljava/lang/Object;
    :cond_7
    instance-of v12, v9, Lorg/json/JSONArray;

    if-eqz v12, :cond_8

    move-object v10, v9

    .line 175
    check-cast v10, Lorg/json/JSONArray;

    .line 176
    .restart local v10       #values:Lorg/json/JSONArray;
    invoke-virtual {v8, v5, v10}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto/16 :goto_0

    .line 180
    .end local v10           #values:Lorg/json/JSONArray;
    :cond_8
    new-instance v11, Ljava/lang/RuntimeException;

    new-instance v12, Ljava/lang/StringBuilder;

    const-string v13, "wrong type for tag: "

    invoke-direct {v12, v13}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v12, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v12

    invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v12

    invoke-direct {v11, v12}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v11

    .line 194
    .end local v5           #key:Ljava/lang/String;
    .end local v9           #value:Ljava/lang/Object;
    .restart local v2       #exception:Ljava/lang/Exception;
    .restart local v3       #i:I
    .restart local v6       #res:Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;
    :cond_9
    :try_start_0
    const-string v11, "setTags"

    invoke-static {v0, v11}, Lcom/arellomobile/android/push/utils/NetworkUtils;->makeRequest(Ljava/util/Map;Ljava/lang/String;)Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;

    move-result-object v6

    .line 195
    const/16 v11, 0xc8

    invoke-virtual {v6}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultCode()I

    move-result v12

    if-eq v11, v12, :cond_a

    .line 190
    :goto_3
    add-int/lit8 v3, v3, 0x1

    goto/16 :goto_1

    .line 198
    :cond_a
    const/16 v11, 0xc8

    invoke-virtual {v6}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getPushwooshCode()I

    move-result v12

    if-ne v11, v12, :cond_0

    .line 201
    const-string v11, "PushWoosh DeviceFeature2_5"

    const-string v12, "Send Tags success"

    invoke-static {v11, v12}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 202
    invoke-virtual {v6}, Lcom/arellomobile/android/push/utils/NetworkUtils$NetworkResult;->getResultData()Lorg/json/JSONObject;

    move-result-object v11

    const-string v12, "response"

    invoke-virtual {v11, v12}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v7

    .line 203
    .local v7, response:Lorg/json/JSONObject;
    if-nez v7, :cond_b

    .line 204
    new-instance v11, Lorg/json/JSONArray;

    invoke-direct {v11}, Lorg/json/JSONArray;-><init>()V

    .line 206
    :goto_4
    return-object v11

    :cond_b
    const-string v11, "skipped"

    invoke-virtual {v7, v11}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v11

    goto :goto_4

    .line 208
    .end local v7           #response:Lorg/json/JSONObject;
    :catch_0
    move-exception v1

    .line 210
    .local v1, e:Ljava/lang/Exception;
    move-object v2, v1

    goto :goto_3
.end method
